When pictures of the same object are captured under different light sources, red, green, and blue (RGB) signals produced by an image sensor are usually different. For example, the RGB signals captured for a gray object under daylight (e.g., around a color temperature of 6500K) may have a stronger blue signal than a red signal, while under horizon light (e.g., around a color temperature of 2200K) the red signal may be twice that of the blue signal. As a result, a gray object is captured differently as RGB signals generated by the same image sensor under different light sources are not likely to be equal to each other.
Various methods for automatic white balancing are known. Automatic white balancing techniques balance the RGB values of an image captured by an image sensor to generate equal RGB signals for a gray object under different light sources. However, a major difficulty in automatic white balancing techniques is identifying gray pixels. Previous methods, such as shown in FIG. 1, identify gray pixels using four lines to draw a quadrilateral in the B−G (blue minus green) versus R−G (red minus green) space as a region that encloses the white points for different light sources. However, with these methods, the quadrilateral needs to be large enough to enclose the different white points, and with a large enough quadrilateral, colors that are not close to any of the white points may also be erroneously enclosed within the quadrilateral. The result is that AWB algorithms are fooled by a dominant color in the scene because that color is included in the quadrilateral of white points, even though that color is not close to any of the white points.